<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <title></title>
[#import "/admin/include/admin_pagination.ftl" as p/]
[#include "/admin/include/admin_static.htm"]


    <script type="text/javascript">
        $(function () {
            layui.use(['form', 'layer','upload','layedit'], function () {
                var form = layui.form(), $ = layui.jquery, layer = layui.layer,upload = layui.upload,layedit = layui.layedit;

                form.on('submit(saveForm)', function (data) {
                    var index = layer.load();
                    ajax({
                        url: "${path}/admin/payment/save.aspx",
                        data: data.field,
                        success: function (result) {
                            layer.msg(result.content,{time:200}, function () {
                                location.reload();
                            });
                            layer.close(index);
                        },
                        complete: function () {
                            layer.close(index);
                        }
                    });
                    return false;
                });


            });
        });
    </script>
</head>
<body>
	<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
    	<legend>支付方式</legend>
	</fieldset>

    <form class="layui-form">
	<div class="layui-form-item">
    	<label class="layui-form-label">支付类型：</label>
    	<div class="layui-input-block" style="margin-left: 150px">


			${p2p_get_dict("recharge_methods",(payment.style)!'' )!'线下支付'}
            <input type="hidden" name="style" value="${(payment.style)!'0' }" />
		</div>
	</div>
        <input type="hidden" name="status" value="${payment.status!'0'}" />
		<input type="hidden" name="id" value="${payment.id!''}" />
    <div class="layui-form-item">
        <label class="layui-form-label">支付名称：</label>
        <div class="layui-input-block" style="margin-left: 150px">
            <input type="text" name="name" value="${(payment.name)!'' }" class="layui-input"/>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">线下支付参数：</label>
        <div class="layui-input-block" style="margin-left: 150px">
            <textarea name="description" rows="4" cols="30" class="layui-textarea">${(payment.description)!''}</textarea>
        </div>
    </div>

        <div class="layui-form-item">
            <div class="layui-input-block">
            <button lay-submit lay-filter="saveForm" class="layui-btn" style="width: 280px;margin-top:3px;">保存</button>
			</div>
        </div>

	</form>


</body>
</html>